Skip to content

increase debounce threshold for instant searches #5944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

escattone
Copy link
Contributor

@escattone escattone commented Apr 4, 2024

mozilla/sumo#1717

I discovered that we're already "debouncing" changes to the instant search input box, but the pause threshold is far too low, so we're seeing too many fractured search terms in GA4. This PR increases the pause threshold from 200ms to 600ms, which should remove a lot of search-term fracturing.

Alternative

Another option would be to make our "instant" searches behave like our searches made on the search page. Those searches are only triggered once the user submits the search term via the "enter" key, so we're capturing the user's intention rather than all of the intermediate steps.

@escattone escattone force-pushed the increase-debounce-threshold-for-instant-searches-1717 branch from cf8d5a0 to f552116 Compare April 5, 2024 15:24
Copy link
Collaborator

@akatsoulas akatsoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try first this approach. The downside with the alternative you proposed is that many users may won't hit the enter button b/c of the search-as-you-type functionality

@escattone escattone merged commit cf8b3a9 into mozilla:main Apr 8, 2024
@escattone escattone deleted the increase-debounce-threshold-for-instant-searches-1717 branch April 8, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants